package com.dongdong.service.impl;

import com.dongdong.service.EsService;
import com.dongdong.util.ESUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;

@Service
public class EsServiceImpl implements EsService {

    @Autowired
    private ESUtil esUtil;

    public String es(@RequestParam("index") String index, @RequestParam("str") String str){
        String s = esUtil.keywordSearch(index, str, 0, 100);//全文检索
        return s;
    }
}
